package com.hzcx.app.simplechat.ui.login.presenter;

import android.content.Context;

import com.hzcx.app.simplechat.api.BaseDialogObserver;
import com.hzcx.app.simplechat.base.BasePresenter;
import com.hzcx.app.simplechat.model.LoginModel;
import com.hzcx.app.simplechat.ui.login.bean.LoginInfoBean;
import com.hzcx.app.simplechat.ui.login.bean.PhoneCityBean;
import com.hzcx.app.simplechat.ui.login.contract.LoginByPwdContract;
import com.hzcx.app.simplechat.ui.login.contract.PhoneCityContract;

import java.util.List;

public class PhoneCityPresenter extends BasePresenter<PhoneCityContract.View> implements PhoneCityContract.Presenter {

    /**
     *  获取号码前缀地区城市
     * @param context
     */
    @Override
    public void getPhoneCity(Context context) {
        LoginModel.getPhoneCity(context, new BaseDialogObserver<List<PhoneCityBean>>(context) {
            @Override
            protected void onSuccess(List<PhoneCityBean> data) {
                mView.phoneCityResult(data);
            }
        });
    }
}
